import { App } from 'vue'
import baseRouter,{setupBaseRouter} from '@/utils/baseRouter'
import layout from '@/components/layout/index.vue'
import login from '../views/login/index.vue'
//uniapp
export const routes: any = [
  {
    path: '/login',
    name: 'layout',
    redirect: '/',
    component: layout,
    meta: {},
    children: [
      {
        path: '/login',
        name: 'login',
        component: login,
        meta: {
          title: '登录',
          isLogin: true,
          public: true,
          navbar: false,
          tabbar:false,
        }
      }
    ]
  },
]
//uniapp
export function setupRouter (app: App) {
  routes.forEach(item=>{
    baseRouter.addRoute(item);
  })
  setupBaseRouter(app)
}
